/************************************************************
	File:		Particle.cpp
	Author:		Mitchel Mishiev
	Purpose:	CParticle class creates the particles of the Game
************************************************************/

#include "Particle.h"


CParticle::CParticle(void)
{
	CurrLife         = 0.0f;
	EndLife          = 0.0f;
	CurrVelocityX    = 0.0f;
	CurrVelocityY    = 0.0f;
	CurrRotation	 = 0.0f;
	CurrScaleX		 = 0.0f;
	CurrScaleY		 = 0.0f;
	CurrColorRed	 = 0;
	CurrColorGreen   = 0;
	CurrColorBlue    = 0;
	PositionX		 = 0;
	PositionY		 = 0;
}


CParticle::~CParticle(void)
{
}

CParticle::CParticle(const CParticle& part)
{
	//Assign the regular variable the data
	PositionX		= part.PositionX;
	PositionY		= part.PositionY;
	CurrLife		= part.CurrLife;
	EndLife         = part.EndLife;
	CurrVelocityX   = part.CurrVelocityX;
	CurrVelocityY   = part.CurrVelocityY;
	CurrScaleX		= part.CurrScaleX;
	CurrRotation	= part.CurrRotation;
	CurrScaleY		= part.CurrScaleY;
	CurrColorAlpha	= part.CurrColorAlpha;
	CurrColorRed	= part.CurrColorRed;
	CurrColorGreen	= part.CurrColorGreen;
	CurrColorBlue	= part.CurrColorBlue;
}

CParticle& CParticle::operator=( const CParticle& part)
{
	//Check
	if( this != &part )
	{
		//Assign the regular variable the data
		PositionX		= part.PositionX;
		PositionY		= part.PositionY;
		CurrLife		= part.CurrLife;
		EndLife         = part.EndLife;
		CurrVelocityX   = part.CurrVelocityX;
		CurrVelocityY   = part.CurrVelocityY;
		CurrRotation	= part.CurrRotation;
		CurrScaleX		= part.CurrScaleX;
		CurrScaleY		= part.CurrScaleY;
		CurrColorRed	= part.CurrColorRed;
		CurrColorGreen	= part.CurrColorGreen;
		CurrColorBlue	= part.CurrColorBlue;
	}

	//Return
	return *this;
}
